From ab62fadd82f5ee05da26942832a5a8d72de91c2b Mon Sep 17 00:00:00 2001 From: Padraig O'Briain Date: Fri, 15 Mar 2002 10:06:02 +0000 Subject: [PATCH] Fudge keymap to have lower upper case variants if there is only a single * gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower upper case variants if there is only a single keysym per keycode and the key symbol has upper and lower case variants (#74512) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gdk/x11/gdkkeys-x11.c | 18 ++++++++++++++++++ 8 files changed, 60 insertions(+) diff --git a/ChangeLog b/ChangeLog index a8e2d36282..b84b2e192f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-03-15 Padraig O'Briain + + * gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower + upper case variants if there is only a single keysym per keycode and + the key symbol has upper and lower case variants (#74512) + Thu Mar 14 17:09:52 2002 Owen Taylor * gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index a8e2d36282..b84b2e192f 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2002-03-15 Padraig O'Briain + + * gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower + upper case variants if there is only a single keysym per keycode and + the key symbol has upper and lower case variants (#74512) + Thu Mar 14 17:09:52 2002 Owen Taylor * gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a8e2d36282..b84b2e192f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2002-03-15 Padraig O'Briain + + * gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower + upper case variants if there is only a single keysym per keycode and + the key symbol has upper and lower case variants (#74512) + Thu Mar 14 17:09:52 2002 Owen Taylor * gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index a8e2d36282..b84b2e192f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2002-03-15 Padraig O'Briain + + * gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower + upper case variants if there is only a single keysym per keycode and + the key symbol has upper and lower case variants (#74512) + Thu Mar 14 17:09:52 2002 Owen Taylor * gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index a8e2d36282..b84b2e192f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2002-03-15 Padraig O'Briain + + * gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower + upper case variants if there is only a single keysym per keycode and + the key symbol has upper and lower case variants (#74512) + Thu Mar 14 17:09:52 2002 Owen Taylor * gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a8e2d36282..b84b2e192f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2002-03-15 Padraig O'Briain + + * gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower + upper case variants if there is only a single keysym per keycode and + the key symbol has upper and lower case variants (#74512) + Thu Mar 14 17:09:52 2002 Owen Taylor * gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a8e2d36282..b84b2e192f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2002-03-15 Padraig O'Briain + + * gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower + upper case variants if there is only a single keysym per keycode and + the key symbol has upper and lower case variants (#74512) + Thu Mar 14 17:09:52 2002 Owen Taylor * gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c index f80b742abb..c499d9620b 100644 --- a/gdk/x11/gdkkeys-x11.c +++ b/gdk/x11/gdkkeys-x11.c @@ -166,6 +166,24 @@ update_keymaps (void) if (syms[KEYSYM_INDEX (i, 0)] == GDK_Tab) syms[KEYSYM_INDEX (i, 1)] = GDK_ISO_Left_Tab; } + + /* + * If there is one keysym and the key symbol has upper and lower + * case variants fudge the keymap + */ + if (syms[KEYSYM_INDEX (0, 1)] == 0) + { + guint lower; + guint upper; + + gdk_keyval_convert_case (syms[KEYSYM_INDEX (0, 0)], &lower, &upper); + if (lower != upper) + { + syms[KEYSYM_INDEX (0, 0)] = lower; + syms[KEYSYM_INDEX (0, 1)] = upper; + } + } + ++keycode; } -- 2.30.2